﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Products.aspx.cs" Inherits="ShoppingCartWEB.Products" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server" >
<div id="Title">
Product<div>Search : <asp:TextBox ID="TextBox1" runat="server" Width="299px"></asp:TextBox>&nbsp;<asp:Button 
            ID="Button1" runat="server" onclick="Button1_Click" Text="Search" />
        <asp:Button ID="Button2" runat="server" onclick="Button2_Click" 
            Text="Show All" />
    </div>
</div>
<div id="content">
            <asp:DataList ID="dlProduct" runat="server" RepeatColumns="3" 
                RepeatDirection="Horizontal" onitemcommand="dlProduct_ItemCommand" 
                DataKeyField="ProductID">
                <HeaderStyle HorizontalAlign="Left" BackColor="#3D7169" ForeColor="#FFFFFF" />
				<FooterStyle HorizontalAlign="Right" BackColor="#6C6B66" ForeColor="#FFFFFF" />
                <AlternatingItemStyle />
                <ItemTemplate>
                    <div class="item" style="padding:15,15,15,15">
                        <div class="item_image"><a href="ProductDetail.aspx?pid=<%# Eval("ProductID") %>"><asp:Image ID="Image1" runat="server" CssClass="" ImageUrl ='<%# DataBinder.Eval(Container.DataItem, "imageLink") %>' ImageAlign="Middle" /></a></div>
                        <div class="item_info">
                            <p><span>Name:</span> <%# DataBinder.Eval(Container.DataItem,"ProductName") %></p>
                            <p><span>Supplier:</span> <%# DataBinder.Eval(Container.DataItem, "Supplier.CompanyName")%></p>
                            <p><span>Price: </span> <%# DataBinder.Eval(Container.DataItem,"ProductPrice","{0:c}") %></p>
                        </div>
                        
                        <!--<asp:Button Text ="Add Cart" runat="server" PostBackUrl="~/Cart.aspx" CommandName="AddCart" /> -->
                        <asp:ImageButton ID="btnAddCart" class="item_button_cart" runat="server" CommandName="AddToCart" ImageUrl="~/Images/AddToCard.png"/>
                    
                    </div>
                </ItemTemplate>
            </asp:DataList>
        </div> <!-- End Content -->
</asp:Content>
